//对外暴露插件对象
import SvgIcon from '@/components/SvgIcon/index.vue'
//引入el-icon图标库
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

//全局对象
const allComponents: any = { SvgIcon }

export default {
  install(app: any) {
    //注册全局组件
    Object.keys(allComponents).forEach((key) => {
      app.component(key, allComponents[key])
    })
    //注册全局图标
   for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
  },
}
